﻿using System;

namespace FBGraph.ClientGenerator
{
    class Program
    {
        [STAThread] // required for the web browser control used for authentication
        static void Main(string[] args)
        {
            var auth = new Auth();
            auth.ShowDialog();

            var parser = new Parser();
            var generator = new Generator();

            Console.WriteLine("Gathering documentation and sample data...");
            var objectData = parser.GetObjectData();

            Console.WriteLine("Generating C# types...");
            var compileUnits = generator.Generate(objectData);

            Console.WriteLine("Updating FBGraph.Api project...");            
            Project.AddTypes(compileUnits);
        }
    }
}